package com.study.demoservice.aop;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Constraint;
import java.lang.annotation.*;

/**
 * @author chenyeqing
 */
@Documented
@Constraint(validatedBy = PhoneNumberValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface PhoneNumber {

    String message() default "Invalid phone number";

    Class[] groups() default {};

    Class[] payload() default {};
}
